package com.android.namecard.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.android.namecard.R;

public class MakeCardActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.make_card);
        Button selfDefineBut = (Button)findViewById(R.id.self_define);
        Button standardBut = (Button)findViewById(R.id.standard);
        
        //自定义名片按钮的事件响应
        OnClickListener listener1 = new OnClickListener(){

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(MakeCardActivity.this,SelfDefineActivity.class);
				startActivity(intent);
				MakeCardActivity.this.finish();
			}
        	
        };
        
        //标准名片按钮的事件响应
        OnClickListener listener2 = new OnClickListener(){

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent intent = new Intent(MakeCardActivity.this, StandarNamecardActivity.class);
				startActivity(intent);
				MakeCardActivity.this.finish();
			}
        	
        };
        
        selfDefineBut.setOnClickListener(listener1);
        standardBut.setOnClickListener(listener2);
    }
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data){
    	switch(resultCode){
    	case RESULT_OK:
    		//取得返回的文件路径
    		
    		break;
    	default:
    		break;
    	}
    }
}
